import React from 'react';
import ReactDOM from 'react-dom';

const name = 'Jack'
const age = 18
const hobbies = ['T', 'Y', 'K', 'E']
const obj = { name: 'xq', age: '22' }
const zy = <div>
  <h1>名字：{name} 年龄 {age}</h1>
  <div>{hobbies}</div>
  <div>{obj.name}{obj.age}</div>
</div>

// 列表渲染
const books = ['']

const el = React.createElement(
  'div',
  null,
  React.createElement('h1', null, '购物列表'),
  React.createElement(
    'ul',
    null,
    React.createElement('li', null, '华为'),
    React.createElement('li', null, 'iPhone')
  )
)
ReactDOM.render(el, document.getElementById('root'))

export default el